package com.happle.gcmclient.backendmanager.task;

import android.os.AsyncTask;
import android.util.Log;

import com.happle.gcmclient.backendmanager.BackendManager;
import com.happle.gcmclient.config.Constants;

public class SendUnregisterTask extends AsyncTask<Void, Void, Integer> {
	private String regId = "";
	private boolean isLogin = false;

	public SendUnregisterTask(Boolean IsLogin, String regId) {
		this.regId = regId;
		this.isLogin = IsLogin;
	}

	@Override
	protected Integer doInBackground(Void... params) {
		int result = Constants.FAILED;
		try {
			BackendManager bManager = new BackendManager();
			result = bManager.sendUnregister(regId, false);
		} catch (Exception e) {
			e.printStackTrace();
		}
		Log.d("SendUnregisterTask", String.valueOf(result));
		return result;
	}
}
